package com.erp.remote.information;

import com.erp.util.AjaxResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@RequestMapping("/information/permission")
public interface PermissionRemote {

    @PostMapping("/selectPermissions")
    AjaxResult selectPermissions();

    @PostMapping("/insertPermissionWithPermissionArrayAndPosition")
    AjaxResult  insertPermissionWithPermissionArrayAndPosition(@RequestBody Map<String, Object> params);

    @PostMapping("/updatePermissionWithPermissionArrayAndPosition")
    AjaxResult  updatePermissionWithPermissionArrayAndPosition(@RequestBody Map<String, Object> params);


    /**
     *
     * 根据userId查询对应的权限对象列表
     * @param userId
     * @return
     */
    @PostMapping("/selectPermissionListByUserId")
    AjaxResult selectPermissionListByUserId(@RequestParam("userId") Integer userId);
}
